/* stm32f103-stk.c --- 
 * 
 * Filename: stm32f103-stk.c
 * Description: This is STM32F103-STK hardware-platform interface
 * Author: Molnár Zoltán
 * Created: Thu Oct 24 13:56:10 2013 (+0200)
 * Version: 
 * Last-Updated: Sat Nov 23 16:58:41 2013 (+0100)
 *           By: Molnár Zoltán
 *     Update #: 8
 * 
 */

/* This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 3, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; see the file COPYING.  If not, write to
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth
 * Floor, Boston, MA 02110-1301, USA.
 */

/*******************************************************************************/
/* INCLUDES                                                                    */
/*******************************************************************************/
/* General header file */
#include "stm32f103-stk.h"
#include "stm32f10x_rcc.h"

/*******************************************************************************/
/* DEFINED CONSTANTS                                                           */
/*******************************************************************************/


/*******************************************************************************/
/* MACRO DEFINITIONS                                                           */
/*******************************************************************************/


/*******************************************************************************/
/* TYPE DEFINITIONS                                                            */
/*******************************************************************************/


/*******************************************************************************/
/* DEFINITIONS OF GLOBAL CONSTANTS AND VARIABLES                               */
/*******************************************************************************/


/*******************************************************************************/
/* DEFINITION OF LOCAL FUNCTIONS                                               */
/*******************************************************************************/


/*******************************************************************************/
/* DEFINITION OF GLOBAL FUNCTIONS                                              */
/*******************************************************************************/
/** This function is documented iin stm32f103-stk.h */
void vBoardInitLed( void)
{
  GPIO_InitTypeDef GPIO_InitStructure;
  
  /* Enable clock for LED GPIO port */
  RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC, ENABLE);


  GPIO_StructInit(&GPIO_InitStructure);
  GPIO_InitStructure.GPIO_Pin = LEDPIN;
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
  GPIO_Init(LEDPORT, &GPIO_InitStructure);
}

/******************************* END OF FILE ***********************************/

